<include file="Public:header" />
<style type="text/css">
	.body{
		width:100%;
		border-top:2px solid #9CB8CC;
		margin:0 auto;
	}
	.uwidth{
		margin-top:10px;
		margin-left:30px;
	}
	
	ul li{
		float:left;
		width:200px;
		height:310px;
		margin-right:10px;
		margin-bottom:20px;
		text-align:center;
		background:#DEE4ED;
	}
	.title{
		width:200px;
		padding-top:5px;
	}
</style>
<script type="text/javascript">
	function albumpass(obj){
		var id = obj.value;
		if(id ==''){
			alert('请先刷新页面');
			return false;
		}
		if(confirm('本文章通过审核？')){
			var url = 'http://fashion/trends/index.php?m=Review&a=realbum&id='+id;
			$.ajax({
				url:url,
				type:"GET",
				dataType:"json",
				async: false,
				success:function(result){
					if(result.status==1){
						$('.no_'+id).attr('checked',false);
						$('.yes_'+id).attr('checked',true);
					}else{
						obj.checked = false;
						alert('审核失败，请刷新页面重新审核');
					}
				}
			});
		}else{
			obj.checked = false;
		}
	}
	function albumnopass(obj){
		var id = obj.value;
		if(id ==''){
			alert('请先刷新页面');
			return false;
		}
		if(confirm('本文章未通过审核？')){
			var url = 'http://fashion/trends/index.php?m=Review&a=noalbum&id='+id;
			$.ajax({
				url:url,
				type:"GET",
				dataType:"json",
				async: false,
				success:function(result){
					if(result.status==1){
						$('.yes_'+id).attr('checked',false);
						$('.no_'+id).attr('checked',true);
					}else{
						obj.checked = false;
						alert('审核失败，请刷新页面重新审核');
					}
				}
			});
		}else{
			obj.checked = false;
		}
	}
	function sharedel(obj){
		var id = obj.value;
		if(id ==''){
			alert('请先刷新页面');
			return false;
		}
		if(confirm('确定删除本段落内容和图片吗？')){
			var url = 'http://fashion/trends/index.php?m=Review&a=reshare&id='+id;
			$.ajax({
				url:url,
				type:"GET",
				dataType:"json",
				async: false,
				success:function(result){
					if(result.status==1){
						$('.share_'+id).remove();
					}else{
						obj.checked = false;
						alert('删除失败，请刷新页面重新删除');
					}
				}
			});
		}else{
			obj.checked = false;
		}
	}
</script>
<div class="body">
	<div class="uwidth">
	<ul>
		<volist name='list' id='vo'>
		<li class="album_{$vo['id']} share_{$vo['share_id']}">
			<div class="title">
				{$vo['title']}
			</div>
			<div>
			<img src="http://fashion/res/{$vo['img']}" width="180" height="260">
			</div>
			<div>
				<span>
				<input type="checkbox" class="yes_{$vo['id']}" name="album[]" onclick="albumpass(this)" <if condition="$vo['audit_status'] eq 1">checked=checked</if> value="{$vo['id']}">通过
				</span>
				<span>
				<input type="checkbox" class="no_{$vo['id']}" name="album[]" onclick="albumnopass(this)" <if condition="$vo['audit_status'] eq 2">checked=checked</if> value="{$vo['id']}">不通过
				</span>
				<span>
				<input type="checkbox" name="share[]" onclick="sharedel(this)" value="{$vo['share_id']}">删除本段落
				</span>
			</div>
		</li>
		</volist>
	</ul>
	</div>
</div>
<div class="pager">{$page}</div>
<include file="Public:footer" />